<div class="grid_18 alpha head">
  <div class="grid_9 alpha title">
    <h6>
      我<b>『指派』</b>的任务
    </h6>
  </div>
  <div class='grid_9 omega'>
    <div class='statuses'>
      <%= link_to "未完成",tasks_url(:type => 'waiting'),:remote => true, :method => :get, :title => '尚未完成的任务' %>
      <b>|</b>
      <%= link_to "已完成",tasks_url(:type => 'completed'),:remote => true, :method => :get, :title => '已经完成的任务' %>
      <b>|</b>
      <%= link_to "指派",tasks_url(:type => 'assigned'),:remote => true, :method => :get, :class => 'h', :title => '指派出去的任务' %>
    </div>
  </div>
</div>
<div id="tasks" class='grid_18 alpha '>    
  <% if Task.overdue.assigned.any? %>
    <div class='some_tasks overdue'>
      <h5>
        以往
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.overdue.assigned, :allow_to_be_edited => true} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <%if Task.today.assigned.any? %>
    <div class='some_tasks today'>
      <h5>
        今天
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.today.assigned, :allow_to_be_edited => true} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <% if Task.tomorrow.assigned.any? %>
    <div class='some_tasks'>
      <h5>
        明天
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.tomorrow.assigned, :allow_to_be_edited => true} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <% if Task.this_week.assigned.any? %>
    <div class='some_tasks'>
      <h5>
        本周
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.this_week.assigned, :allow_to_be_edited => true} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <% if Task.next_week.assigned.any? %>
    <div class='some_tasks'>
      <h5>
        下周
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.next_week.assigned} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <% if Task.this_month.assigned.any? %>
    <div class='some_tasks'>
      <h5>
        本月
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.this_month.assigned} %>
      <div class='clear'></div>
    </div>
  <% end %>
  <% if Task.later.assigned.any? %>
    <div class='some_tasks'>
      <h5>
        随后
      </h5>
      <%= render :partial => 'orders/tasks/detail_in_index.html', :locals => {:tasks => Task.later.assigned, :allow_to_be_edited => true} %>
      <div class='clear'></div>
    </div>
  <% end %>
</div>